3.64 \(\int \frac{x (d+e x^2+f x^4)}{(a+b x^2+c x^4)^2} \, dx\)

Optimal. Leaf size=123 \[ \frac{x^2 \left (-\left (-2 a c f+b^2 f-b c e+2 c^2 d\right )\right )-b (a f+c d)+2 a c e}{2 c \left (b^2-4 a c\right ) \left (a+b x^2+c x^4\right )}+\frac{\tanh ^{-1}\left (\frac{b+2 c x^2}{\sqrt{b^2-4 a c}}\right ) (2 a f-b e+2 c d)}{\left (b^2-4 a c\right )^{3/2}} \]

[Out]

(2*a*c*e - b*(c*d + a*f) - (2*c^2*d - b*c*e + b^2*f - 2*a*c*f)*x^2)/(2*c*(b^2 - 4*a*c)*(a + b*x^2 + c*x^4)) +
((2*c*d - b*e + 2*a*f)*ArcTanh[(b + 2*c*x^2)/Sqrt[b^2 - 4*a*c]])/(b^2 - 4*a*c)^(3/2)

________________________________________________________________________________________

Rubi [A]  time = 0.183795, antiderivative size = 123, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 5, integrand size = 28, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.179, Rules used = {1663, 1660, 12, 618, 206} \[ \frac{x^2 \left (-\left (-2 a c f+b^2 f-b c e+2 c^2 d\right )\right )-b (a f+c d)+2 a c e}{2 c \left (b^2-4 a c\right ) \left (a+b x^2+c x^4\right )}+\frac{\tanh ^{-1}\left (\frac{b+2 c x^2}{\sqrt{b^2-4 a c}}\right ) (2 a f-b e+2 c d)}{\left (b^2-4 a c\right )^{3/2}} \]

Antiderivative was successfully verified.

[In]

Int[(x*(d + e*x^2 + f*x^4))/(a + b*x^2 + c*x^4)^2,x]

[Out]

(2*a*c*e - b*(c*d + a*f) - (2*c^2*d - b*c*e + b^2*f - 2*a*c*f)*x^2)/(2*c*(b^2 - 4*a*c)*(a + b*x^2 + c*x^4)) +
((2*c*d - b*e + 2*a*f)*ArcTanh[(b + 2*c*x^2)/Sqrt[b^2 - 4*a*c]])/(b^2 - 4*a*c)^(3/2)

Rule 1663

Int[(Pq_)*(x_)^(m_.)*((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^(p_), x_Symbol] :> Dist[1/2, Subst[Int[x^((m - 1)/2)
*SubstFor[x^2, Pq, x]*(a + b*x + c*x^2)^p, x], x, x^2], x] /; FreeQ[{a, b, c, p}, x] && PolyQ[Pq, x^2] && Inte
gerQ[(m - 1)/2]

Rule 1660

Int[(Pq_)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> With[{Q = PolynomialQuotient[Pq, a + b*x + c*
x^2, x], f = Coeff[PolynomialRemainder[Pq, a + b*x + c*x^2, x], x, 0], g = Coeff[PolynomialRemainder[Pq, a + b
*x + c*x^2, x], x, 1]}, Simp[((b*f - 2*a*g + (2*c*f - b*g)*x)*(a + b*x + c*x^2)^(p + 1))/((p + 1)*(b^2 - 4*a*c
)), x] + Dist[1/((p + 1)*(b^2 - 4*a*c)), Int[(a + b*x + c*x^2)^(p + 1)*ExpandToSum[(p + 1)*(b^2 - 4*a*c)*Q - (
2*p + 3)*(2*c*f - b*g), x], x], x]] /; FreeQ[{a, b, c}, x] && PolyQ[Pq, x] && NeQ[b^2 - 4*a*c, 0] && LtQ[p, -1
]

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 618

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> Dist[-2, Subst[Int[1/Simp[b^2 - 4*a*c - x^2, x], x]
, x, b + 2*c*x], x] /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0]

Rule 206

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTanh[(Rt[-b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[-b, 2]), x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rubi steps

\begin{align*} \int \frac{x \left (d+e x^2+f x^4\right )}{\left (a+b x^2+c x^4\right )^2} \, dx &=\frac{1}{2} \operatorname{Subst}\left (\int \frac{d+e x+f x^2}{\left (a+b x+c x^2\right )^2} \, dx,x,x^2\right )\\ &=\frac{2 a c e-b (c d+a f)-\left (2 c^2 d-b c e+b^2 f-2 a c f\right ) x^2}{2 c \left (b^2-4 a c\right ) \left (a+b x^2+c x^4\right )}-\frac{\operatorname{Subst}\left (\int \frac{2 c d-b e+2 a f}{a+b x+c x^2} \, dx,x,x^2\right )}{2 \left (b^2-4 a c\right )}\\ &=\frac{2 a c e-b (c d+a f)-\left (2 c^2 d-b c e+b^2 f-2 a c f\right ) x^2}{2 c \left (b^2-4 a c\right ) \left (a+b x^2+c x^4\right )}-\frac{(2 c d-b e+2 a f) \operatorname{Subst}\left (\int \frac{1}{a+b x+c x^2} \, dx,x,x^2\right )}{2 \left (b^2-4 a c\right )}\\ &=\frac{2 a c e-b (c d+a f)-\left (2 c^2 d-b c e+b^2 f-2 a c f\right ) x^2}{2 c \left (b^2-4 a c\right ) \left (a+b x^2+c x^4\right )}+\frac{(2 c d-b e+2 a f) \operatorname{Subst}\left (\int \frac{1}{b^2-4 a c-x^2} \, dx,x,b+2 c x^2\right )}{b^2-4 a c}\\ &=\frac{2 a c e-b (c d+a f)-\left (2 c^2 d-b c e+b^2 f-2 a c f\right ) x^2}{2 c \left (b^2-4 a c\right ) \left (a+b x^2+c x^4\right )}+\frac{(2 c d-b e+2 a f) \tanh ^{-1}\left (\frac{b+2 c x^2}{\sqrt{b^2-4 a c}}\right )}{\left (b^2-4 a c\right )^{3/2}}\\ \end{align*}

Mathematica [A]  time = 0.122431, size = 130, normalized size = 1.06 \[ \frac{a b f-2 a c \left (e+f x^2\right )+b^2 f x^2+b c \left (d-e x^2\right )+2 c^2 d x^2}{2 c \left (4 a c-b^2\right ) \left (a+b x^2+c x^4\right )}-\frac{\tan ^{-1}\left (\frac{b+2 c x^2}{\sqrt{4 a c-b^2}}\right ) (-2 a f+b e-2 c d)}{\left (4 a c-b^2\right )^{3/2}} \]

Antiderivative was successfully verified.

[In]

Integrate[(x*(d + e*x^2 + f*x^4))/(a + b*x^2 + c*x^4)^2,x]

[Out]

(a*b*f + 2*c^2*d*x^2 + b^2*f*x^2 + b*c*(d - e*x^2) - 2*a*c*(e + f*x^2))/(2*c*(-b^2 + 4*a*c)*(a + b*x^2 + c*x^4
)) - ((-2*c*d + b*e - 2*a*f)*ArcTan[(b + 2*c*x^2)/Sqrt[-b^2 + 4*a*c]])/(-b^2 + 4*a*c)^(3/2)

________________________________________________________________________________________

Maple [A]  time = 0.011, size = 205, normalized size = 1.7 \begin{align*}{\frac{1}{2\,c{x}^{4}+2\,b{x}^{2}+2\,a} \left ( -{\frac{ \left ( 2\,acf-{b}^{2}f+bce-2\,{c}^{2}d \right ){x}^{2}}{ \left ( 4\,ac-{b}^{2} \right ) c}}+{\frac{abf-2\,cea+bcd}{ \left ( 4\,ac-{b}^{2} \right ) c}} \right ) }+2\,{\frac{af}{ \left ( 4\,ac-{b}^{2} \right ) ^{3/2}}\arctan \left ({\frac{2\,c{x}^{2}+b}{\sqrt{4\,ac-{b}^{2}}}} \right ) }-{be\arctan \left ({(2\,c{x}^{2}+b){\frac{1}{\sqrt{4\,ac-{b}^{2}}}}} \right ) \left ( 4\,ac-{b}^{2} \right ) ^{-{\frac{3}{2}}}}+2\,{\frac{cd}{ \left ( 4\,ac-{b}^{2} \right ) ^{3/2}}\arctan \left ({\frac{2\,c{x}^{2}+b}{\sqrt{4\,ac-{b}^{2}}}} \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x*(f*x^4+e*x^2+d)/(c*x^4+b*x^2+a)^2,x)

[Out]

1/2*(-(2*a*c*f-b^2*f+b*c*e-2*c^2*d)/(4*a*c-b^2)/c*x^2+1/c*(a*b*f-2*a*c*e+b*c*d)/(4*a*c-b^2))/(c*x^4+b*x^2+a)+2
/(4*a*c-b^2)^(3/2)*arctan((2*c*x^2+b)/(4*a*c-b^2)^(1/2))*a*f-1/(4*a*c-b^2)^(3/2)*arctan((2*c*x^2+b)/(4*a*c-b^2
)^(1/2))*b*e+2/(4*a*c-b^2)^(3/2)*arctan((2*c*x^2+b)/(4*a*c-b^2)^(1/2))*c*d

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(f*x^4+e*x^2+d)/(c*x^4+b*x^2+a)^2,x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [B]  time = 1.44558, size = 1374, normalized size = 11.17 \begin{align*} \left [-\frac{{\left (2 \,{\left (b^{2} c^{2} - 4 \, a c^{3}\right )} d -{\left (b^{3} c - 4 \, a b c^{2}\right )} e +{\left (b^{4} - 6 \, a b^{2} c + 8 \, a^{2} c^{2}\right )} f\right )} x^{2} +{\left ({\left (2 \, c^{3} d - b c^{2} e + 2 \, a c^{2} f\right )} x^{4} + 2 \, a c^{2} d - a b c e + 2 \, a^{2} c f +{\left (2 \, b c^{2} d - b^{2} c e + 2 \, a b c f\right )} x^{2}\right )} \sqrt{b^{2} - 4 \, a c} \log \left (\frac{2 \, c^{2} x^{4} + 2 \, b c x^{2} + b^{2} - 2 \, a c -{\left (2 \, c x^{2} + b\right )} \sqrt{b^{2} - 4 \, a c}}{c x^{4} + b x^{2} + a}\right ) +{\left (b^{3} c - 4 \, a b c^{2}\right )} d - 2 \,{\left (a b^{2} c - 4 \, a^{2} c^{2}\right )} e +{\left (a b^{3} - 4 \, a^{2} b c\right )} f}{2 \,{\left (a b^{4} c - 8 \, a^{2} b^{2} c^{2} + 16 \, a^{3} c^{3} +{\left (b^{4} c^{2} - 8 \, a b^{2} c^{3} + 16 \, a^{2} c^{4}\right )} x^{4} +{\left (b^{5} c - 8 \, a b^{3} c^{2} + 16 \, a^{2} b c^{3}\right )} x^{2}\right )}}, -\frac{{\left (2 \,{\left (b^{2} c^{2} - 4 \, a c^{3}\right )} d -{\left (b^{3} c - 4 \, a b c^{2}\right )} e +{\left (b^{4} - 6 \, a b^{2} c + 8 \, a^{2} c^{2}\right )} f\right )} x^{2} - 2 \,{\left ({\left (2 \, c^{3} d - b c^{2} e + 2 \, a c^{2} f\right )} x^{4} + 2 \, a c^{2} d - a b c e + 2 \, a^{2} c f +{\left (2 \, b c^{2} d - b^{2} c e + 2 \, a b c f\right )} x^{2}\right )} \sqrt{-b^{2} + 4 \, a c} \arctan \left (-\frac{{\left (2 \, c x^{2} + b\right )} \sqrt{-b^{2} + 4 \, a c}}{b^{2} - 4 \, a c}\right ) +{\left (b^{3} c - 4 \, a b c^{2}\right )} d - 2 \,{\left (a b^{2} c - 4 \, a^{2} c^{2}\right )} e +{\left (a b^{3} - 4 \, a^{2} b c\right )} f}{2 \,{\left (a b^{4} c - 8 \, a^{2} b^{2} c^{2} + 16 \, a^{3} c^{3} +{\left (b^{4} c^{2} - 8 \, a b^{2} c^{3} + 16 \, a^{2} c^{4}\right )} x^{4} +{\left (b^{5} c - 8 \, a b^{3} c^{2} + 16 \, a^{2} b c^{3}\right )} x^{2}\right )}}\right ] \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(f*x^4+e*x^2+d)/(c*x^4+b*x^2+a)^2,x, algorithm="fricas")

[Out]

[-1/2*((2*(b^2*c^2 - 4*a*c^3)*d - (b^3*c - 4*a*b*c^2)*e + (b^4 - 6*a*b^2*c + 8*a^2*c^2)*f)*x^2 + ((2*c^3*d - b
*c^2*e + 2*a*c^2*f)*x^4 + 2*a*c^2*d - a*b*c*e + 2*a^2*c*f + (2*b*c^2*d - b^2*c*e + 2*a*b*c*f)*x^2)*sqrt(b^2 -
4*a*c)*log((2*c^2*x^4 + 2*b*c*x^2 + b^2 - 2*a*c - (2*c*x^2 + b)*sqrt(b^2 - 4*a*c))/(c*x^4 + b*x^2 + a)) + (b^3
*c - 4*a*b*c^2)*d - 2*(a*b^2*c - 4*a^2*c^2)*e + (a*b^3 - 4*a^2*b*c)*f)/(a*b^4*c - 8*a^2*b^2*c^2 + 16*a^3*c^3 +
 (b^4*c^2 - 8*a*b^2*c^3 + 16*a^2*c^4)*x^4 + (b^5*c - 8*a*b^3*c^2 + 16*a^2*b*c^3)*x^2), -1/2*((2*(b^2*c^2 - 4*a
*c^3)*d - (b^3*c - 4*a*b*c^2)*e + (b^4 - 6*a*b^2*c + 8*a^2*c^2)*f)*x^2 - 2*((2*c^3*d - b*c^2*e + 2*a*c^2*f)*x^
4 + 2*a*c^2*d - a*b*c*e + 2*a^2*c*f + (2*b*c^2*d - b^2*c*e + 2*a*b*c*f)*x^2)*sqrt(-b^2 + 4*a*c)*arctan(-(2*c*x
^2 + b)*sqrt(-b^2 + 4*a*c)/(b^2 - 4*a*c)) + (b^3*c - 4*a*b*c^2)*d - 2*(a*b^2*c - 4*a^2*c^2)*e + (a*b^3 - 4*a^2
*b*c)*f)/(a*b^4*c - 8*a^2*b^2*c^2 + 16*a^3*c^3 + (b^4*c^2 - 8*a*b^2*c^3 + 16*a^2*c^4)*x^4 + (b^5*c - 8*a*b^3*c
^2 + 16*a^2*b*c^3)*x^2)]

________________________________________________________________________________________

Sympy [B]  time = 40.1526, size = 474, normalized size = 3.85 \begin{align*} - \frac{\sqrt{- \frac{1}{\left (4 a c - b^{2}\right )^{3}}} \left (2 a f - b e + 2 c d\right ) \log{\left (x^{2} + \frac{- 16 a^{2} c^{2} \sqrt{- \frac{1}{\left (4 a c - b^{2}\right )^{3}}} \left (2 a f - b e + 2 c d\right ) + 8 a b^{2} c \sqrt{- \frac{1}{\left (4 a c - b^{2}\right )^{3}}} \left (2 a f - b e + 2 c d\right ) + 2 a b f - b^{4} \sqrt{- \frac{1}{\left (4 a c - b^{2}\right )^{3}}} \left (2 a f - b e + 2 c d\right ) - b^{2} e + 2 b c d}{4 a c f - 2 b c e + 4 c^{2} d} \right )}}{2} + \frac{\sqrt{- \frac{1}{\left (4 a c - b^{2}\right )^{3}}} \left (2 a f - b e + 2 c d\right ) \log{\left (x^{2} + \frac{16 a^{2} c^{2} \sqrt{- \frac{1}{\left (4 a c - b^{2}\right )^{3}}} \left (2 a f - b e + 2 c d\right ) - 8 a b^{2} c \sqrt{- \frac{1}{\left (4 a c - b^{2}\right )^{3}}} \left (2 a f - b e + 2 c d\right ) + 2 a b f + b^{4} \sqrt{- \frac{1}{\left (4 a c - b^{2}\right )^{3}}} \left (2 a f - b e + 2 c d\right ) - b^{2} e + 2 b c d}{4 a c f - 2 b c e + 4 c^{2} d} \right )}}{2} - \frac{- a b f + 2 a c e - b c d + x^{2} \left (2 a c f - b^{2} f + b c e - 2 c^{2} d\right )}{8 a^{2} c^{2} - 2 a b^{2} c + x^{4} \left (8 a c^{3} - 2 b^{2} c^{2}\right ) + x^{2} \left (8 a b c^{2} - 2 b^{3} c\right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(f*x**4+e*x**2+d)/(c*x**4+b*x**2+a)**2,x)

[Out]

-sqrt(-1/(4*a*c - b**2)**3)*(2*a*f - b*e + 2*c*d)*log(x**2 + (-16*a**2*c**2*sqrt(-1/(4*a*c - b**2)**3)*(2*a*f
- b*e + 2*c*d) + 8*a*b**2*c*sqrt(-1/(4*a*c - b**2)**3)*(2*a*f - b*e + 2*c*d) + 2*a*b*f - b**4*sqrt(-1/(4*a*c -
 b**2)**3)*(2*a*f - b*e + 2*c*d) - b**2*e + 2*b*c*d)/(4*a*c*f - 2*b*c*e + 4*c**2*d))/2 + sqrt(-1/(4*a*c - b**2
)**3)*(2*a*f - b*e + 2*c*d)*log(x**2 + (16*a**2*c**2*sqrt(-1/(4*a*c - b**2)**3)*(2*a*f - b*e + 2*c*d) - 8*a*b*
*2*c*sqrt(-1/(4*a*c - b**2)**3)*(2*a*f - b*e + 2*c*d) + 2*a*b*f + b**4*sqrt(-1/(4*a*c - b**2)**3)*(2*a*f - b*e
 + 2*c*d) - b**2*e + 2*b*c*d)/(4*a*c*f - 2*b*c*e + 4*c**2*d))/2 - (-a*b*f + 2*a*c*e - b*c*d + x**2*(2*a*c*f -
b**2*f + b*c*e - 2*c**2*d))/(8*a**2*c**2 - 2*a*b**2*c + x**4*(8*a*c**3 - 2*b**2*c**2) + x**2*(8*a*b*c**2 - 2*b
**3*c))

________________________________________________________________________________________

Giac [A]  time = 19.2514, size = 189, normalized size = 1.54 \begin{align*} -\frac{{\left (2 \, c d + 2 \, a f - b e\right )} \arctan \left (\frac{2 \, c x^{2} + b}{\sqrt{-b^{2} + 4 \, a c}}\right )}{{\left (b^{2} - 4 \, a c\right )} \sqrt{-b^{2} + 4 \, a c}} - \frac{2 \, c^{2} d x^{2} + b^{2} f x^{2} - 2 \, a c f x^{2} - b c x^{2} e + b c d + a b f - 2 \, a c e}{2 \,{\left (c x^{4} + b x^{2} + a\right )}{\left (b^{2} c - 4 \, a c^{2}\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(f*x^4+e*x^2+d)/(c*x^4+b*x^2+a)^2,x, algorithm="giac")

[Out]

-(2*c*d + 2*a*f - b*e)*arctan((2*c*x^2 + b)/sqrt(-b^2 + 4*a*c))/((b^2 - 4*a*c)*sqrt(-b^2 + 4*a*c)) - 1/2*(2*c^
2*d*x^2 + b^2*f*x^2 - 2*a*c*f*x^2 - b*c*x^2*e + b*c*d + a*b*f - 2*a*c*e)/((c*x^4 + b*x^2 + a)*(b^2*c - 4*a*c^2
))